﻿using HamcoWcs.Entitys.WcsLocations;
using HamcoWcs.Models.Common;
using System.Collections.Generic;
using System.Drawing;

namespace HamcoWcs.Models.ForeEndModels.Wms
{

    public class UIWcsLocation
    {
        public UIWcsLocation()
        {
            
        }

        public UIWcsLocation(WcsLocation loc)
        {
            Id = loc.Id;
            Row = loc.Row;
            Bay = loc.Bay;
            Lev = loc.Lev;
            WmsLocName = loc.WmsLocName;
            WcsLocName = loc.WcsLocName;
            SrmName = loc.SrmName;
            UnitId = loc.UnitId;
            LocStatus = loc.LocStatus;
            IsLock = loc.IsLock;
            SrmOccupyFlag = loc.SrmOccupyFlag;
            Aisle = loc.Aisle;
            ZoneName = loc.ZoneName;
            BasicShelf = loc.BasicShelf;
            WcsZone = loc.WcsZone;
            Remark = loc.Remark;
        }
        public long Id { get; set; }
        public int Row { get; set; }
        public int Bay { get; set; }
        public int Lev { get; set; }
        public string WmsLocName { get; set; }
        public string WcsLocName { get; set; }
        public string SrmName { get; set; }
        public string UnitId { get; set; }
        public int LocStatus { get; set; }
        public bool IsLock { get; set; }
        public bool SrmOccupyFlag { get; set; }

        //public string LocType { get; set; }
        public string Aisle { get; set; }
        public string ZoneName { get; set; }
        public bool BasicShelf { get; set; }
        public string WcsZone { get; set; }
        public string Remark { get; set; }
        public string SettingCode { get; set; }
        public string PalletType { get; set; }
    }



    public class WcsLocationQueryDto : PageSize
    {
        public int? Row { get; set; }
        public int? Bay { get; set; }
        public int? Lev { get; set; }
        public string WcsLocName { get; set; }
        public string UnitId { get; set; }
        public int? LocStatus { get; set; }
        public bool? IsLock { get; set; }
        //public string LocType { get; set; }
        public string Aisle { get; set; }
        public string ZoneName { get; set; }
        public bool? BasicShelf { get; set; }
        //public string SrmZone { get; set; }
        public string Remark { get; set; }
        public string WcsZone { get; set; }
        public string SettingCode { get; set; }
        public string PalletType { get; set; }
    }

    public class WcsLocationResult : PageResult<UIWcsLocation>
    {
        public WcsLocationResult(int count, int pageCount, List<UIWcsLocation> data) : base(count, pageCount, data)
        {
        }
    }

    /// <summary>
    /// 获取货架列和层
    /// </summary>
    public class LocSizeResult : ForeEndResult
    {
        public int Bay { get; set; }
        public int Lev { get; set; }
    }

    /// <summary>
    /// 获取货架排数
    /// </summary>
    public class LocRowListResult : ForeEndResult
    {
        public int[] Rows { get; set; }
    }

    public class UILocInfo
    {
        public long Id { get; set; }
        public string Name { get; set; }
        public string UnitId { get; set; }
        public string State { get; set; }
        public string LocType { get; set; }
        public bool IsLock { get; set; }
        public bool SrmOccupyFlag { get; set; }
        public string Remark { get; set; }
        public string ZoneName { get; set; }
        public bool BasicShelf { get; set; }
        public string WcsZone { get; set; }
        public string PalletType { get; set; }
        public string Size { get; set; }
        public string TeachInfo { get; set; }
    }
    /// <summary>
    /// 货架信息
    /// </summary>
    public class LocInfoResult : ForeEndListResult<UILocInfo>
    {
        public LocInfoResult(List<UILocInfo> data) : base(data)
        {
        }
    }

    public class WcsLocationZoneDto
    {
        public string WcsLocName { get; set; }

        public string ZoneName { get; set; }
    }

    public class WcsLocationBasicShelfDto
    {
        public string WcsLocName { get; set; }

        public bool BasicShelf { get; set; }
    }

    public class UILocationModel
    {
        public string WcsLocName { get; set; }
    }

    public class ShelfCreateAccountModel
    {
        public string WcsLocName { get; set; }
        public int LocStatus { get; set; }
        public string UnitId { get; set; }
    }

    public class WcsLocUpdateDto
    {
        public string WcsLocName { get; set; }
        public int LocStatus { get; set; }
        public bool IsLock { get; set; }
        public string Remark { get; set; }
    }
    public class WcsLocUpdateIsLockDto
    {
        public string[] WmsLocNames { get; set; }
        public int IsLock { get; set; }


    }

}
